#include "threadshowtime.h"
#include "ui_threadshowtime.h"

ThreadShowTime::ThreadShowTime(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::ThreadShowTime)
{
    ui->setupUi(this);

    //关联线程信号sendData
    connect(&showtimeThread,&ShowTime::sendData,this,&ThreadShowTime::update_time);

    //启动线程
    showtimeThread.start();
}

ThreadShowTime::~ThreadShowTime()
{
    delete ui;
}

void ThreadShowTime::update_time(QString t)
{
    ui->label->setText(t);
}
